<?php

namespace app\api\service\alipay;

use app\lib\exception\ParameterException;

use think\Db;
use think\Exception;

class MemberlevelPay extends BasePay
{
    public function pay($param)
    {
        //$member = \app\admin\model\Member::get($param->memberId);

        // 调用支付宝支付
        $trade_no = $param->order_no;
        $total_amount = $param->vip_cost;
        $body = '开通会员等级';
        $subject = '开通会员等级';
        $notify_url = config('alipay.memberlevel_pay_back_url');
        $result = $this->run($body, $subject, $trade_no, $total_amount, $notify_url);

        //return $result;
        //return true;
        return show(config('status.SUCCESS_STATUS'), 'ok', $result);
    }
}